#include <stdio.h>
#define LOCAL
int main()
{
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    const int INF = 10e6;
    int n, t, max, min, sum = 0, flag = 0;
    while (scanf("%d", &n) == 1 && n)
    {
        max = -INF, min = INF, sum = 0;
        for (int i = 0; i < n; i++)
        {
            scanf("%d", &t);
            if (t > max)
                max = t;
            if (t < min)
                min = t;
            sum += t;
        }
        if (flag)
            printf("\n");
        printf("case %d: %d %d %.3f\n", ++flag, min, max, (double)sum / n);
    }
    return 0;
}